package com.love.marriage.userProfileInfo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.love.marriage.common.interfaces.permission.DataPermission;
import com.love.marriage.userProfileInfo.entity.UserProfileInfo;
import com.love.marriage.userProfileInfo.vo.UserProfileInfoVo;
import com.love.marriage.userProfileInfo.vo.UserProfileVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description:  用户档案表 mapper
 * author:       mybatisPlus
 * createDate:   2024-10-12 21:01:09
 * version:      1.0.0
 */
@Mapper
public interface UserProfileInfoMapper extends BaseMapper<UserProfileInfo> {

    @DataPermission(table = "user_profile_info_t")
    Page<UserProfileInfoVo> getPage(Page<UserProfileInfoVo> page,
                                    @Param("userProfileInfoVo") UserProfileInfoVo userProfileInfoVo,
                                    @Param("type") String type);

    @DataPermission(table = "user_profile_info_t")
    Page<UserProfileInfoVo> getPageWithMembership(Page<UserProfileInfoVo> page,
                                                  @Param("userProfileInfoVo") UserProfileInfoVo userProfileInfoVo,
                                                  @Param("type") String type);

    UserProfileInfoVo queryUserProfileInfo(@Param("id") Long id);

    UserProfileInfoVo queryUserProfileInfoByUserId(@Param("userId") Long userId);

    List<UserProfileVo> getList(@Param("userProfileInfoVo") UserProfileInfoVo userProfileInfoVo, @Param("type") String type);
}
